package cn.tm.liu.mode.command.demo1;

/**
 * @author Marvin.L
 * @description
 * @date 2022.04.09 14.12
 */
public class Stock {

    private String name = "ABC";
    private int quantity = 10;

    public Stock(String name, int quantity) {
        this.name = name;
        this.quantity = quantity;
    }

    public void buy() {
        System.out.println("Stock [ Name: " + name + ", Quantity: " + quantity + " ] bought");
    }

    public void sell() {
        System.out.println("Stock [ Name: " + name + ", Quantity: " + quantity + " ] sold");
    }

}
